void solve()
{
	int n, k;
	cin >> n >> k;

	vector<vector<int>> dp(n + 1, vector<int>(n + 1));
	dp[0][0] = 1;

	for (int i = 1; i <= n; i++) {
		for (int j = i; j >= 1; j--) {
			dp[i][j] = dp[i - 1][j - 1];
			if ((j << 1) <= i) {
				dp[i][j] = (dp[i][j] + dp[i][j << 1]) % mod;
			}
		}
	}
	cout << dp[n][k];
}